package com.gun.management.module.raffle.dal.dataobject.lotterylog;

import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.gun.management.framework.mybatis.core.dataobject.BaseDO;

/**
 * 用户抽奖日志 DO
 *
 * @author 测试账号
 */
@TableName("raffle_lottery_log")
@KeySequence("raffle_lottery_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LotteryLogDO extends BaseDO {

    /**
     * 编号
     */
    @TableId(value = "id",type=IdType.AUTO)
    private Long id;
    /**
     * 用户id
     */
    private Long userId;

    /**
     * 抽奖id
     */
    private Long lotteryId;



    /**
     * 抽奖名称
     */
    @TableField(exist = false)
    private String lotteryName;


    /**
     * 抽奖类型
     */
    @TableField(exist = false)
    private Long lotteryCategoryId;


    /**
     * 奖金类型
     */
    @TableField(exist = false)
    private Long prizeType;

    /**
     * 奖品id
     */
    private Long ruleId;

    /**
     * 奖品名称
     */
    @TableField(exist = false)
    private String prizeName;

    /**
     * 用户信息
     */
    @TableField(exist = false)
    private String nickName;

    /**
     * 手机号码
     */
    @TableField(exist = false)
    private String mobile;


    /**
     *
     * 扩展json信息(如
     * [{"provinceCode":"370211","cityCode":"370211","districtCode":"370211","streetCode":"370211","addressDetail":"珠山小一期","receiverPhone":"13013589803","receiver":"马老师"},
     *     {"rechargeAccount":"18563965205","accountType":"1"},
     *     {"orderNo":"240820092407418257053389816299","tradeNo":"SP665172411704681273793","goodsPrice":"9800","orderState":5,"goodsCardPwd":"FWWZDWS8J72SW,FW24Z2FV7Z8CF,FWP7ZTGNS5JEV","goodsCardExpire":"2025-08-20","crtTime":"2024-08-20 09:24:07"}
     * ])
     */
    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    private String extJson;

    /**
     * 扩展信息
     */
    @TableField(exist = false)
    private String extJsonInfo;


    /**
     * 奖品状态(0:待领取 1：已领取未处理 2:处理成功 3:处理失败)
     */
    private Integer status;

    /**
     * 订单号码
     */
    private String orderNo;

    /**
     * 已抽奖总次数
     */
    private Integer totalTimes;
    /**
     * 每人每天已抽奖次数
     */
    private Integer dayTotalTimes;
    /**
     * 消耗积分
     */
    private Integer expenseScore;
    /**
     * 抽奖时间
     */
    private LocalDateTime lotteryTime;

    private Long tenantId;

}